package com.ereport.util;



import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import org.apache.log4j.Logger;
//import org.codehaus.groovy.util.Finalizable;

//import com.crm.view.VMenu;





public class Constants {
	public static String ST_EURO = "\u20ac";
	public static String ST_PI="\u220F";
	public static String ST_OHM="\u2126";
	public static String ST_YEN="\u00A5";
	public static String ST_MICRO="\u00B5";
	public static String ST_LIRA="\u20A4";
	public static final String LOG_NAME="kkcircits_log4j.properties";
	public static final String TITLE="KK Circuits And Equipments";	
	public static final String ST_PENDING="1Pending";
	public static final String ST_SOURCE_INFO_SENT="2Source Sent";
	public static final String ST_SOURCE_INFO_PAR_IMPORT="3Source Partially Imported";
	
	public static final String ST_SOURCE_INFO_RECEIVED="4Source Imported";
	public static final String ST_SOURCES_COMPARED="10Sources Compared";
	
	public static final String ST_GENERATED_QUOTATION="5Generated Quotation";
	
	public static final String ST_GENERATED_SO="9Generated SO";
	public static final String ST_GENERATED_INVOICE="6Generated Invoice";
	public static final String ST_GEN_PO="7Generated PO";	
	public static final String ST_ABORT="Abort";
	public static final String ST_CLOSED="8Closed";
	public static final String [] monNames={"January","February","March","April","May","June","July","August","September","October","November","December"};
	public static final Map<String,Integer> monthsMap=new HashMap<String,Integer>();
	public static final String SOURCE_SUBJECT="Please send source information";
	
	static Logger logger = Logger.getLogger(Constants.class.getName());
	static{
		monthsMap.put("January", 1);
		monthsMap.put("February", 2);
		monthsMap.put("March", 3);
		monthsMap.put("April", 4);
		monthsMap.put("May", 5);
		monthsMap.put("June", 6);
		monthsMap.put("July", 7);
		monthsMap.put("August", 8);
		monthsMap.put("September", 9);
		monthsMap.put("October", 10);
		monthsMap.put("November", 11);
		monthsMap.put("December", 12);
	}
	
	public static final String ST_SEL_ORG="Select Organisation";
	public static final String ST_SEL_DIV="Select Division";
	public static final String ST_SEL_USER="Select User";
	
	
	public static final String ST_TE="TenderEnquiry(TE)";
	public static final String ST_CP="CashPurchase(CP)";
	public static final String ST_BQ="BudgetaryQuotation(BQ)";
	
	
	public static final String ST_PS="Please Select";
	public static final String ADMIN_MAIL="admin@gmail.com";
	
	
	public static final Integer INT_0=Integer.valueOf(0);
	
	public static final SimpleDateFormat formatter= new SimpleDateFormat("yyyy-MM-dd");
	public static final SimpleDateFormat IST_DATE_FORMATER= new SimpleDateFormat("dd/MM/yyyy");
	public static final SimpleDateFormat DD_MM=	new SimpleDateFormat("dd-MM");
	public static final SimpleDateFormat DD_MM_YYYY=	new SimpleDateFormat("dd-MM-yyyy");
	public static final Map<String,Integer> status=new LinkedHashMap<String, Integer>();
	public static final Calendar cal=Calendar.getInstance();
	static{
		status.put(ST_PENDING, 1);
		status.put(ST_SOURCE_INFO_SENT, 2);
		status.put(ST_SOURCE_INFO_PAR_IMPORT,3);
		status.put(ST_SOURCE_INFO_RECEIVED, 4);
		status.put(ST_GENERATED_QUOTATION, 5);
		status.put(ST_GEN_PO, 6);
		status.put(ST_GENERATED_INVOICE, 7);
		status.put(ST_ABORT, 8);
		status.put(ST_CLOSED, 9);
	}
	public static Integer getStatus(String st) {
		return status.get(st);
	}
	public static int getStatusPriority(String s){
		Integer m=null;
		try {
			m= status.get(s);
			logger.info("M Value Is: "+m);
		} catch (Exception e) {
			e.printStackTrace();
		}
		if(m==null){
			m=0;
		}
		return m;
	}
	
	public static Integer getMonthNo(String mon) {
		return monthsMap.get(mon);
	}
	
}
